package com.fyp.client.ptma;

import android.content.Context;
import android.content.Intent;
import android.os.Parcelable;

public class CustomIntent extends Intent
{

	public CustomIntent()
	{
		super();
	}

	public CustomIntent(Context fromActivity, Class toActivity)
	{
		super(fromActivity, toActivity);
	}

	public Intent putExtra(String name, Object value)
	{

		if (value instanceof String)
		{
			return super.putExtra(name, (String) value);
		} else if (value instanceof Integer)
		{
			return super.putExtra(name, (Integer) value);
		} else if (value instanceof Float)
		{
			return super.putExtra(name, (Float) value);
		} else if (value instanceof Double)
		{
			return super.putExtra(name, (Double) value);
		} else if (value instanceof Parcelable)
		{
			return super.putExtra(name, (Parcelable) value);
		}

		return this;

	}
}
